<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">
<h:head>

</h:head>
<h:body>
	<ui:composition template="../template.xhtml">
		<ui:define name="menu">

			<h:form prependId="false">
				<p:menu id="leftIm">

					<p:submenu label="Area Impiegato">
						<p:menuitem value="Admin" outcome="index" icon="ui-icon-home" />
						<p:menuitem value="Mezzi" outcome="showEditMezzo"
							icon="ui-icon-star" />
						<p:menuitem value="Escursioni" outcome="showEditEscursione"
							icon="ui-icon-star" />
						<p:menuitem value="Alberghi" outcome="showEditAlbergo"
							icon="ui-icon-star" />
						<p:menuitem value="Luoghi" outcome="luoghiLis" icon="ui-icon-star" />
						<p:menuitem value="New Pacchetto" outcome="AddPacchetto"
							icon="ui-icon-star" />
						<p:menuitem value="Logout" action="#{logoutBean.logout()}"
							icon="ui-icon-close" />
					</p:submenu>
				</p:menu>
			</h:form>
		</ui:define>
		<ui:define name="content">
			<h:form id="form">
		<p:panel header="Lista Escursioni">
					<h:panelGrid columns="" id="regGrid">
				
				<p:dataTable id="pacchetti" var="car" value="#{showEscursioneModBean.carsSmall}" update="regGrid" rowKey="#{car.id}" selection="#{showEscursioneModBean.selectesc}" selectionMode="single">

					

					
					<p:column headerText="Id Escursione" >#{car.id}</p:column>

					<p:column headerText="Posti Disponibili" >#{car.postiDisponibili}</p:column>
					<p:column headerText="Costo Persona" >#{car.costoPerEsc}</p:column>
					<p:column headerText="Id Luogo" >#{car.idLuogo}</p:column>
					
					<p:column headerText="Data Inizio" >#{car.dataInizio}</p:column>
					<p:column headerText="Data Fine" >#{car.dataFine}</p:column>
					<p:column headerText="Descrizione" >#{car.infoEsc}</p:column>




					

				</p:dataTable>

			<p:commandButton value="Modifica Selezionato" update="regGrid" icon="ui-icon-search"  action="#{showEscursioneModBean.modify()}" />	
			<p:commandButton value="Elimina Selezionato" update="regGrid" icon="ui-icon-search"  action="#{showEscursioneModBean.delete()}" />	
			<h:link value="Inserisci nuova escursione" outcome="inserimentoEscursione" />
			
			</h:panelGrid>
			
			
			
			</p:panel>
			
			</h:form>
		</ui:define>
		


	</ui:composition>
</h:body>
</html>